<%
# Copyright (C) 2014 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
%>

<% js_bundle 'module_sequence_footer' %>
<% if @tag.context.is_a?(Assignment) && (can_do(@tag.context, @current_user, :grade) || can_do(@tag.context.context, @current_user, :manage_assignments)) %>
  <% content_for :right_side do %>
    <% assignment = @tag.context %>
    <a href="<%= context_url(assignment.context, :edit_context_assignment_url, assignment.id, :return_to => request.url) %>" class="btn button-sidebar-wide">
      <i class="icon-edit"></i>
      <%= t :edit_assignment_settings, "Edit Assignment Settings" %>
    </a>
    <a target="_blank" id="speedgrader_button" class="btn button-sidebar-wide" href="<%= context_url(assignment.context, :speed_grader_context_gradebook_url, :assignment_id => assignment.id) %>">
      <i class="icon-speed-grader"></i>
      <%= t :speed_grader, "Speed Grader™" %>
    </a>
  <% end %>
<% end %>
<% if @module_tag %>
  {{> views/shared/sequence_footer}}
<% end %>
